var meizu_img=document.getElementsByClassName('meizu_img');
var banner=document.getElementById('banner');
var img=document.getElementById('img');
var click_point=document.getElementsByClassName('click_point');
var color=['#E7FAFF','#FFFFFF','#121212','#E0E7F9','#E4E4E4','#EBEBEB'];
var num=0;
function run(){
	for (var i =0 ; i<meizu_img.length;i++) {
		meizu_img[i].style.display="none";
		click_point[i].style.backgroundColor="rgba(0,0,0,0)";
	};

	meizu_img[num].style.display="block";
	banner.style.backgroundColor=color[num];
	click_point[num].style.backgroundColor="#00C3F5";

	if(num == meizu_img.length-1){
		num=0;
	}else{
		num++;
	}
}
run();
var time=setInterval(run,1000);
img.onmouseover=function(){
	clearInterval(time);
}
img.onmouseout=function(){
	time = setInterval(run,1000);
}

for (var i =1; i<click_point.length; i++) {
	click_point[i].onmouseover=function(){
		this.style.backgroundColor="rgba(0,195,245,1)";
	}
	click_point[i].onmouseout=function(){
		this.style.backgroundColor="rgba(0,195,245,0)";
	}
	pointclick(i);
};
function pointclick(i){
	click_point[i].onclick=function(){
		num=i;
		run();
	}
}